const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 根据user模块的token进行计算
  token: state => state.user.token,
  // 建立用户名称的映射
  name: state => state.user.userInfo.username,
  // 建立用户id的映射
  userId: state => state.user.userInfo.userId,
  // 建议用户头像的映射
  photo: state => state.user.userInfo.staffPhoto,
  // 公司id
  companyId: state => state.user.userInfo.companyId,
  // 路由对象
  routes: state => state.permission.routes,
  // 用户信息
  userInfo: state => state.user.userInfo
}
export default getters
